<? session_start();
require_once('Local_Settings.php');
require_once('cart/inc/functions/Cart_Functions.php');?>
<?php
include('style/header-1.php');//hieronder komt de linkerbalk met artikelen
include('menu.php');//dit zorgt ervoor dat het menu verschijnt.
include('style/body-2.php');//hieronder het midden van de pagina 
?>
<?php
include('config.php');
$moboid = $_POST['mobo'];
$hdid = $_POST['hd'];
$cpuid = $_POST['cpu'];
$psuid = $_POST['psu'];
$p = $_GET['p'];
$limits = ($p - 1) * $max; 
$max = 25;
$subcat1 = "Grafische kaarten";
$tbl_name = "artikelen";
$totalpages = ceil($totalres / $max); 
$sql = mysql_query("select idartikelen, name, price, imagefilename, korting FROM $tbl_name WHERE subcategory1 = '$subcat1' GROUP BY idartikelen LIMIT ".$limits.",$max") or die(mysql_error());
$FileName = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);

echo "<table border='3' width='550px;'><tr><td>artikelnummer</td><td>naam</td><td>prijs</td><td>thumb</td><td>voeg toe</td></tr>";

while($r = mysql_fetch_array($sql))
{
$gfxid = $r['idartikelen'];
$name = $r['name'];
$korting= $r['korting'];
$korting=$korting/100;
$price= $r['price'];
$price = ($price-($price*$korting));
$price =  number_format($price, 2, ',', ' ');
$img = $r['imagefilename'];
echo "<tr><td>$gfxid</td><td><a href='artikelen.php?act=view&id=$gfxid'>$name</a></td><td>&euro; $price</td><td><img src='images/products/thumb_$img'</img></td><td><a href='memselect.php?mobo=$_POST['moboid']&hd=$_POST['hdid']&cpu=$_POST['cpuid']&psu=$_POST['psuid']&gfx=$gfxid>add</a></td></tr>";
}
echo "</table>";


/*
<form method='post'action='http://group3productions.info/pcbuilder.php'> 
  <input name='gfxID' type='hidden' value='$gfxid' />
  <input name='gfx' type='hidden' id='gfx' value='1' /> 
  <input type='submit' name='submit' value='Add' />
*/
?>
<?php include('style/body-3.php');//hieronder de rechterbalk ?>
<? echo ( DisplayCartBald($Session_Prefix,$Currency_Symbol,$Currency_Code));?> 
<?php include('style/footer-4.php');?>